<include file="Public/header" />
<include file="Public:Left" />
<div class="content-wrapper">

    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> {$plugin.name}配送列表
                        <a href=""><button type="button" class="btn btn-info">
                                <i class="ace-icon fa fa-plus bigger-110"></i>
                            </button></a> </h3>
                </div>
                <div class="panel-body">
                    <div id="ajax_return">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <td style="width: 1px;" class="text-center">
                                            <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);">
                                        </td>
                                        <td class="text-center">
                                            公众号
                                        </td>
                                        <td class="text-center">
                                            配送区域
                                        </td>
                                        <td class="text-center">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <volist name="shippingList" id="list">
                                        <tr>
                                            <td class="text-center">
                                                <input type="checkbox" name="selected[]" value="{$list.shipping_area_id}">
                                            </td>
                                            <td class="text-center">{$list.shipping_area_name}</td>
                                            <td class="text-center">{$list.region_list}</td>
                                            <td class="text-center">
                                                <a href="{:U('Admin/Plugin/shippingListEdit',array('id'=>$list[shipping_area_id],'type'=>$plugin['type'],'code'=>$plugin['code']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                                                <a href="javascript:;" data-href="{:U('Admin/Plugin/delArea',array('id'=>$list[shipping_area_id],'type'=>$plugin['type'],'code'=>$plugin['code']))}" onclick="del('{$list[shipping_area_id]}', this)" id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                                            </td>
                                        </tr>
                                    </volist>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<script>
// 删除操作
function del(id, t) {
    if (!confirm('确定要删除吗?'))
        return false;

    location.href = $(t).data('href');
}
</script>
<include file="Public:footer" />
